package com.ikun.aimian.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ikun.aimian.model.dto.job.JobQueryRequest;
import com.ikun.aimian.model.entity.Job;
import com.ikun.aimian.model.vo.JobVO;

import javax.servlet.http.HttpServletRequest;

public interface JobService extends IService<Job> {

    /**
     * 校验岗位数据
     *
     * @param job 岗位对象
     * @param add 是否为新增操作
     */
    void validJob(Job job, boolean add);


    /**
     * 获取岗位封装 VO
     *
     * @param job 岗位实体
     * @param request HttpServletRequest
     * @return JobVO
     */
    JobVO getJobVO(Job job, HttpServletRequest request);

    /**
     * 分页获取岗位封装 VO
     *
     * @param jobPage 分页对象
     * @param request HttpServletRequest
     * @return 分页的 JobVO
     */
    Page<JobVO> getJobVOPage(Page<Job> jobPage, HttpServletRequest request);

    QueryWrapper<Job> getQueryWrapper(JobQueryRequest queryRequest);

    }
